<script type="text/javascript">
        var GB_ROOT_DIR = "./greybox/";
    </script>
     <script type="text/javascript" src="greybox/AJS.js"></script>
    <script type="text/javascript" src="greybox/gb_scripts_home.js"></script>
      <link href="greybox/gb_styles.css" rel="stylesheet" type="text/css" media="all" />

<?php session_start();
if (!isset($_SESSION["txt_login"]))
{ print "<script type = 'text/javascript'> location.href = 'index.php'</script>"; exit();}


header("Content-Type: text/html; charset=ISO-8859-1",true);

$ac = $_GET["ac"];
$id_vagas = $_GET["id_vagas"];

if($ac=="at"){
mysql_query("update vagas set ativo='S' where id_vagas = '$id_vagas' and id_cadastro_empresa = '".$_SESSION["id_cadastro_empresa"]."'");
}
if($ac=="des"){
mysql_query("update vagas set ativo='N' where id_vagas = '$id_vagas' and id_cadastro_empresa = '".$_SESSION["id_cadastro_empresa"]."'");
}
if($ac=="ex"){
mysql_query("delete from vagas where id_vagas = '$id_vagas' and id_cadastro_empresa = '".$_SESSION["id_cadastro_empresa"]."'");
}


?>
<div style="width:794px; height:100%; float:left; background-color: #FFFFFF;">
  <div style="width:794px; float:left; text-transform:capitalize; font-weight: bold; margin-bottom:20px; margin-top:10px; text-decoration:underline;" align="center">Lista de Curr&iacute;culos</div>
         
        <div style="width:794px; float:left; text-transform:capitalize; font-weight: bold;">
          <div style="width:120px;float:left;border:1px solid #155E62;" align="center">cargo Curr&iacute;culo</div>
        <div style="width:250px;float:left;border:1px solid #155E62;" align="center">Email Candidato</div>
        <div style="width:210px;float:left;border:1px solid #155E62;"  align="center">Nome do Candidato</div>
        <div style="width:110px;float:left;border:1px solid #155E62;" align="center">Cidade/uf</div>
        <div style="width:80px;float:left;border:1px solid #155E62;">A&ccedil;&otilde;es</div>
        </div>
        <div style="width:790px; height:100%; float:left;">
          <?php 
		  
		 /*  $sq_v = mysql_query("SELECT vagas.cargo_vaga, c. * , cr. * , vagas_curriculos.id_curriculos
FROM vagas, cadastro_usuarios c, curriculos cr, vagas_curriculos
WHERE vagas.id_vagas=vagas_curriculos.id_vagas and cr.id_curriculos = vagas_curriculos.id_curriculos
AND c.id_cadastro_usuarios = cr.id_cadastro_usuarios
AND vagas_curriculos.id_vagas = '$id_vagas'"); */

$sq_v=mysql_query("SELECT c.* , cr.* FROM cadastro_usuarios c, curriculos cr WHERE c.id_cadastro_usuarios = cr.id_cadastro_usuarios");
		  
		        while($linha=mysql_fetch_array($sq_v)){
			   extract($linha);
		  ?>
        
        
        <div style="width:120px; height:45px;float:left; border:1px solid #CCCCCC;"><div style="margin-top:2px; margin-left:5px;"><?php echo $cargo_interesse; ?></div></div>
        <div style="width:250px;height:45px;;float:left;border:1px solid #CCCCCC;"><div style="margin-top:10px; margin-left:5px;"><?php echo $email ; ?></div></div>
        <div style="width:210px;height:45px;float:left;border:1px solid #CCCCCC;"><div style="margin-top:10px; margin-left:5px;">
		<?php $non=explode(" ",$nome); echo $non[0]." ".$non[1];?></div></div>
        <div style="width:110px;height:45px;float:left;border:1px solid #CCCCCC;"><div style="margin-top:3px; margin-left:5px;"><?php echo $txt_id_cidade."<Br>/".$txt_id_estado; ?></div></div>
        <div style="width:80px;height:45px;float:left;border:1px solid #CCCCCC;">
        <a href="visualizar_curriculo_admin.php?id_cadastro_usuarios=<?php echo $id_cadastro_usuarios;?>&id_curriculos=<?php echo $id_curriculos; ?>" onclick="return GB_myShow('Visualiza&ccedil;&atilde;o do Curriculo', this.href)">Visualizar</a>
        /<br />
       <img src="imagens/excluir.gif" onclick='confirmar_exclusao_curriculo("acao=Excluir&amp;id=<?php echo $id_curriculos?>&id_cadastro_usuarios=<?php echo $id_cadastro_usuarios; ?>")'> </div>
         <?php }?>
         
  </div>
</div>
        
         <script type="text/javascript">
GB_myShow = function(caption, url, /* optional */ height, width, callback_fn) {
    var options = {
        caption: caption,
        height: height || 1000,
        width: width || 800,
        fullscreen: false,
        show_loading: true,
        callback_fn: callback_fn
    }
    var win = new GB_Window(options);
    return win.show(url);
}
</script>
        
        
        